﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data; 

namespace xml_to_db
{
    public abstract class ScriptBasedAdapter
    {
        protected abstract IDbConnection GetConnection();
        protected abstract IDbConnection GetConnection(string catalog);

        protected abstract string GetCreateScript(string databaseName, bool overwrite = false);
        protected abstract string GetSchemaScript(DataSet schema);
        protected abstract string GetDataScript(DataSet schema);
        

        protected abstract string MakeTable(DataTable table);
        protected abstract string MakeData(DataTable table);
        protected abstract string MakeColumnMetaTypeList(DataColumnCollection columns);
        protected abstract string MakeColumnList(DataColumn[] columns);
        protected abstract string MakeRelation(DataRelation relation);        
        protected abstract string GetTypeFor(DataColumn column);
        protected abstract string GetTypeForData(DataColumn column, object obj);
    }
}
